package iface;

import common.Message;
import common.ServerResponse;
import common.SignedData;


public interface ForumServerServiceIface {

	/**
	 * Post a message to the forum server
	 * @param clientid - my temporary client ID
	 * @param msg - my message
	 * @param signedMsg - a signed copy of the message
	 * @return - success: true/false
	 */
	public ServerResponse postMessage(Integer userID, byte[] IDSignature, String msg, SignedData[] signedMsg);
	/**
	 * Get all the forum messages
	 * @return List of messages
	 */
	public Message[] getMessages();

	/**
	 * Initialize session with new user. Check signature and if agree on arbitrator
	 * @param userID - User temporary ID
	 * @param IDSignature - ID signature
	 * @param userAcceptableArbitrators - User acceptable array of arbitrators
	 * @return ServerResponse- if agree: true, agreed arbitrator ID
	 * 						   otherwise: false, array of server's acceptable arbitrators  
	 */
	public ServerResponse initSession(Integer userID, byte[] IDSignature, Integer[] userAcceptableArbitrators);
}